Skip to content

Fix bug in the printing of double for limit values #4498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

romainbrenguier
Copy link
Contributor

@romainbrenguier romainbrenguier commented Apr 8, 2019

This corrects a bug in which the minimal value for a double was not printed precisely enough.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • [na] My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • [na] White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@romainbrenguier romainbrenguier changed the title Bugfix/double printing Fix bug in the printing of double for limit values Apr 8, 2019
Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing, hopefully just because of the EXIT=0 noted below.

CORE
double1.class
--function double1.testLimit --trace
^EXIT=0$
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be EXIT=10

--
^warning: ignoring
--
Test double value are printed with sufficient precision
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub would like to have a newline here.

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: f8ef55a).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107499837
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

The case of numeric limit for floating point does not imply that the
decimal version is precise enough.
An example of that is 0x1p-1022 which would be printed as 2.22507e-308
in decimal but this is not precise enough.
@romainbrenguier romainbrenguier force-pushed the bugfix/double-printing branch from f8ef55a to f992352 Compare April 8, 2019 20:18
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: f992352).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107534355
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

@romainbrenguier romainbrenguier force-pushed the bugfix/double-printing branch from f992352 to b453805 Compare April 9, 2019 06:29
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: b453805).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107581083
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

@romainbrenguier romainbrenguier force-pushed the bugfix/double-printing branch 2 times, most recently from 09801c3 to 9acc299 Compare April 9, 2019 07:49
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: 09801c3).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107586414
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

This checks a limit double value is printed with sufficient
precision (the decimal version would not work so we have to use the hexidecimal).
@romainbrenguier romainbrenguier force-pushed the bugfix/double-printing branch from 9acc299 to edfccab Compare April 9, 2019 08:27
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: 9acc299).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107590471
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

@romainbrenguier romainbrenguier merged commit 2825f54 into diffblue:develop Apr 9, 2019
@romainbrenguier romainbrenguier deleted the bugfix/double-printing branch April 9, 2019 09:16
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️
This PR failed Diffblue compatibility checks (cbmc commit: edfccab).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/107595723
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants